﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace TPCN.DAL
{
    public class SupportOnlineObj
    {
        private string _SupportOnlineID;

        public string SupportOnlineID
        {
            get { return _SupportOnlineID; }
            set { _SupportOnlineID = value; }
        }
        private string _Name;

        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        private string _Nickname;

        public string Nickname
        {
            get { return _Nickname; }
            set { _Nickname = value; }
        }
        private string _Type;

        public string Type
        {
            get { return _Type; }
            set { _Type = value; }
        }
        private string _Order;

        public string Order
        {
            get { return _Order; }
            set { _Order = value; }
        }
        private string _Active;

        public string Active
        {
            get { return _Active; }
            set { _Active = value; }
        }

        public SupportOnlineObj SetValuesFromDataReader(IDataReader reader)
        {
            SupportOnlineObj obj = new SupportOnlineObj();
            obj.SupportOnlineID = (reader["SupportOnlineID"] is DBNull) ? String.Empty : reader["SupportOnlineID"].ToString();
            obj.Name = (reader["Name"] is DBNull) ? String.Empty : reader["Name"].ToString();
            obj.Nickname = (reader["Nickname"] is DBNull) ? String.Empty : reader["Nickname"].ToString();
            obj.Type = (reader["Type"] is DBNull) ? String.Empty : reader["Type"].ToString();
            obj.Order = (reader["Order"] is DBNull) ? String.Empty : reader["Order"].ToString();
            obj.Active = (reader["Active"] is DBNull) ? String.Empty : reader["Active"].ToString();
            return obj;
        }
    }
}
